package com.fh.shop.api.common;

public enum ResponseEnum {

    RECIPIENT_ID_MEMBERID_MISMATCH(4000, "会员id和收件人id不匹配"),



    ORDER_INFO_IS_NULL(4200, "订单信息不完整"),
    ORDER_PAY_TYPE_IS_ERROR(4201, "订单支付类型错误"),
    ORDER_STOCK_IS_ERROR(4202, "订单，库存不足的商品:%s"),

    IDEMPOTENCE_HEADER_IS_NULL(4300, "幂等性判断，头信息为空"),
    IDEMPOTENCE_REQUEST_IS_REPEAT(4301, "幂等性判断，请求是非法的"),

    PAY_ORDER_ID_IS_NULL(4400, "支付时，订单id为空！！！"),
    PAY_ORDER_ID_IS_ERROR(4401, "支付时，订单id错误！！！"),
    PAY_PAGE_ERROR(4402, "生成支付页面错误"),
    PAY_ORDER_IS_PAYED(4403, "订单已经支付过了"),


    CART_PRODUCT_IS_NULL(5000, "添加购物车中的商品不存在"),
    CART_PRODUCT_STATUS_IS_DOWN(5001, "添加购物车中的商品已下架"),
    CART_PRODUCT_STOCK_IS_ERROR(5002, "商品库存不足"),
    CART_PRODUCT_COUNT_IS_ERROR(5003, "商品数量非法"),
    CART_IS_NULL(5004, "购物车不存在"),
    CART_PRODUCT_ID_IS_ERROR(5005, "商品id错误"),

    TOKEN_IS_NULL(2200, "token为空"),
    TOKEN_IS_ERROR(2201, "token不完整"),
    TOKEN_SIGN_VALIDATE_ERROR(2202, "验签失败"),
    TOKEN_DECODE_ERROR(2203, "解码失败"),
    TOKEN_IS_TIME_OUT(2204, "token超时了"),
    TOKEN_IS_MISMATCH(2205, "token不匹配"),

    MEMBER_ACTIVE_ID_ERROR(2300, "激活会员，id错误"),
    MEMBER_ACTIVE_MAIL_IS_NULL(2301, "会员激活，邮箱为空"),
    MEMBER_ACTIVE_MAIL_IS_ERROR(2302, "会员激活，邮箱错误"),
    MEMBER_ACTIVE_IS_TRUE(2303, "会员已经被激活了"),

    MEMBER_LOGIN_IS_NULL(2000, "会员登陆，信息为空!!!"),
    MEMBER_LOGIN_NAME_IS_ERROR(2001, "会员登陆，用户名错误!!!"),
    MEMBER_LOGIN_PASSWORD_IS_ERROR(2002, "会员登陆，密码错误!!!"),
    MEMBER_UPDATE_PASSWORD_IS_NULL(2003, "信息为空!!!"),
    MEMBER_UPDATE_PASSWORD_IS_ERROR(2004, "密码和确认密码不一致!!!"),
    MEMBER_UPDATE_PASSWORD_OLD_PASSWORD_IS_ERROR(2005, "旧密码错误!!!"),
    MEMBER_LOGIN_STATUS_IS_ERROR(2006, "会员登陆，未激活!!!"),

    MEMBER_REG_IS_NULL(1000, "会员注册，信息为空!!!"),
    MEMBER_REG_PASSWORD_IS_ERROR(1001, "会员注册，密码不一致!!!"),
    MEMBER_REG_NAME_IS_EXIST(1002, "会员注册，会员名已经存在"),
    MEMBER_REG_PHONE_IS_EXIST(1003, "会员注册，手机已经存在"),
    MEMBER_REG_MAIL_IS_EXIST(1004, "会员注册，邮箱已经存在"),
    MEMBER_REG_CODE_IS_ERROR(1005, "会员注册，短信验证码错误"),

    PHONE_IS_NULL(999, "发送短信，手机号为空!!!"),
    SMS_SEND_ERROR(998, "短信发送失败！！！"),
    PHONE_FORMAT_IS_ERROR(888, "手机号格式错误！！！"),
    MAIL_FORMAT_IS_ERROR(887, "邮箱格式错误！！！"),
    SUCCESS(200, "ok");
    private int code;

    private String msg;

    private ResponseEnum(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public int getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }
}
